#include <stdio.h>  
#include <math.h>  
  
int main() {  
    int a, b, c;  
    double delta;  
    if(scanf("%d%d%d", &a, &b, &c));  
    delta = b * b - 4 * a * c;  
    if (a == 0 && b == 0)  
        printf("Input error!\n");  
    else if (a == 0)  
        printf("x=%f\n", -c * 1.0 / b);  
    else if (delta < 0){  
        if (b == 0)  
            printf("x1=%fi\nx2=-%fi\n", pow(-delta, 0.5) / 2.0 / a,pow(-delta, 0.5) / 2.0 / a);  
        else  
            printf("x1=%f+%fi\nx2=%f-%fi\n", -b / 2.0 / a, pow(-delta, 0.5) / 2.0 / a, -b / 2.0 / a, pow(-delta, 0.5) / 2.0 / a);  
    }  
          
    else if (delta == 0)  
        printf("x1=x2=%f\n", -b / 2.0 / a);  
    else  
        printf("x1=%f\nx2=%f\n", (-b + pow(delta, 0.5)) / 2.0 / a, (-b - pow(delta, 0.5)) / 2.0 / a);  
    return 0;  
} 